package com.vay.de.dang.online.view;

import android.content.Context;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.vay.de.dang.online.R;

public class DialogRequest extends DialogBase {

    private TextView contentTv;
    private ImageView icon;

    public DialogRequest(Context context) {
        super(context);
        setContentView(R.layout.dialog_request);
        contentTv = findViewById(R.id.content_tv);
        icon = findViewById(R.id.icon);
    }

    public void showText(String text) {
        if (text != null) contentTv.setText(text);
        Animation animation = AnimationUtils.loadAnimation(getContext(),
                R.anim.rotate_1);
        icon.startAnimation(animation);
        show();
    }
}
